zavolanlab/mirflowz
Snakemake workflow for the mapping and quantification of miRNAs and isomiRs from miRNA-Seq libraries.
Overview
Topics: bioinformatics isomirs mirna snakemake workflow
Latest release: 0.9.0, last update: 2024-08-19
Linting: passed
Formatting: passed
Configuration
Dependencies installation
Create and activate the virtual environment with the required dependencies with Conda:
conda env create -f environment.yml
conda activate mirflowz
If you plan to run MIRFLOWZ via Conda, we recommend using the following command for a faster environment creation, specially if you will run it on an HPC cluster.
conda config --set channel_priority strict
For a faster creation of the environment (and Conda environments in general),
you can also install Mamba on top of Conda. In that case, replace
conda
with mamba
in the commands above (particularly in
conda env create
).
Running MIRFLOWZ with Singularity
If you want to run MIRFLOWZ via Singularity and do not already have it installed globally on your system, you must further update the Conda environment with:
conda env update -f environment.root.yml
Mind that you must have the environment activated and root permissions on your system to install Singularity. If you want to run MIRFLOWZ on an HPC cluster (recommended in almost all cases), ask your system administrator about Singularity.
Run the workflow on your own samples
In order to run MIRFLOWZ on your own samples, we recommend having all the input files inside a dedicated directory. This way, it is easier to keep the data together and reproduce an analysis. Assuming that your current directory is the repository's root directory, create a directory to store all your data and traverse to it with:
mkdir path/to/your_run
cd path/to/your_run
1. Prepare the sample table
Create an empty sample table. Refer to the sample.tsv test file to see what the table must look like or use it as a template.
touch samples.tsv
Fill the sample table according to the following requirements:
sample
. Arbitrary name for the miRNA sequencing library.sample_file
. Path to the miRNA sequencing library file. The path must be relative to the directory where the workflow will be run.adapter
. Sequence of the 3'-end adapter used during library preparation.format
. One offa
/fasta
orfq
/fastq
, if the library file is in FASTA or FASTQ format, respectively.
2. Prepare the genome resources
There are 4 files you must provide:
-
A
gzip
ped FASTA file containing reference sequences, typically the genome of the source/organism from which the library was extracted. -
A
gzip
ped GTF file with matching gene annotations for the reference sequences above.
MIRFLOWZ expects both the reference sequence and gene annotation files to follow Ensembl style/formatting. If you obtained these files from a source other than Ensembl, you must ensure that they adhere to the expected format by converting them, if necessary.
- An uncompressed GFF3 file with microRNA annotations for the reference sequences above.
MIRFLOWZ expects the miRNA annotations to follow miRBase style/formatting. If you obtained this file from a source other than miRBase, you must ensure that it adheres to the expected format by converting it, if necessary.
-
An uncompressed tab-separated file with a mapping between the reference names used in the miRNA annotation file (column 1; "UCSC style") and in the gene annotations and reference sequence files (column 2; "Ensembl style"). Values in column 1 are expected to be unique, no header is expected, and any additional columns will be ignored. This resource provides such files for various organisms, and in the expected format.
-
OPTIONAL: A BED6 file with regions for which to produce ASCII-style alignment pileups. If not provided, no pileups will be generated. See here for the expected format.
General note: If you want to process the genome resources before use (e.g., filtering), you can do that, but make sure the formats of any modified resource files meet the formatting expectations outlined above!
3. Prepare the configuration file
We recommend creating a copy of the configuration file template.
cp ../config/config_template.yaml config.yaml
Open the new copy in your editor of choice and adjust the configuration parameters to your liking. The template explains what each of the parameters mean and how you can meaningfully adjust them.